perm filename MACH.SJU[P,JRA] blob
sn#156928 filedate 1975-05-01 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 All you ever wanted to know about hardware (yawn, zzzzzz)
C00004 ENDMK
C⊗;
All you ever wanted to know about hardware (yawn, zzzzzz)
Some of the basic registers:
IR: instruction register; holds current instruction. Decoding of
the actual request is done out of this register.
PC: program counter; contains the address of the instruction to
be executed. Typical machine cycle increments this register
(by 1); JUMPs, JUMPNILs, CALLs, and POPJs alter it differently.
AC1-n: registers to handle parameter passing.
P,Cp: stack pointers
more if needed
___________
notation as per Sec 7.2 pp165-166.
basic machine cycle:
l: c(IR)←c(c(PC))
c(PC)←c(PC)+1
execute[IR]
go l
basic control cycle suitable for recursion:
i.e. what "execute[(CALL s fn)]" & "execute[(POPJ s)]" do.
execute[i] <=
is_call[i] → call[stack[i];fn[i]]
is_popj[i] → popj[stack[i]]
......
call[s;fn] <=
c(c(s)) ← c(PC)
c(s) ← c(s)+1
c(PC) ← fn
popj[s] <= ;n.b. popj has a typo in the notes.
c(s) ← c(s)-1
c(PC) ← c(c(s))